The present invention relates to a coding device and a decoding device of an image signal.
In dealing with an image having gradations, it is a general procedure to code image information to reduce its information quantity, because direct digitization of image information will produce an excessively large quantity of information.
There exist various techniques of coding an image signal. Among those, typical techniques of coding an image having gradations include transform coding techniques such as Hideo Hashimoto, "Image Data Coding Algorithm II -Transform Coding-," The Journal of the Institute of Television Engineers of Japan, Vol. 43, No. 10, 1989, pp. 1,145-1,152 and William K. Pratt, "Digital Image Processing," A Wiley-Interscience Publication.
It is known that in general, image signals have such a tendency that adjacent pixels take similar values, which means that image signals have high correlation. That is, on the frequency axis, the signal power of a high-correlation signal is concentrated on particular frequency components. Therefore, it is possible to reduce the information quantity as a whole by coding coefficients of only those frequency components.
In the transform coding, a transform is performed on an image signal so as to produce coefficients statistically independent of each other, and the respective transform coefficients are coded with bit assignment in accordance with the deviation of the signal power (see the first paper mentioned above).
Referring to a block diagram of FIG. 13, the transform coding technique is described below.
In FIG. 13, reference numeral 301 represents a block divider for dividing an image signal 300 into pixel blocks 302; 303, an orthogonal transformer for performing an orthogonal transform on the pixel block 302 to convert it to transform coefficients 304; 305, a quantizer for quantizing the transform coefficients 304 to produce quantized coefficients 306; 307, a symbol constructor for producing coding symbols and additional information 308 from the quantized coefficients 306; 309, an encoder for entropy-coding the coding symbols to output coded information 310 which includes the additional information; 311, a quantization matrix, i.e., registered quantization thresholds; and 312, a coding symbol table in which the coding symbols are registered.
The coding process of the coding device of FIG. 13 is described below, which includes a transform process, an information reduction process, a process of constructing coding symbols, and a code assigning process.
In the transform process, a two-dimensional orthogonal transform is performed utilizing correlation in the horizontal and vertical directions of an image signal. The block divider 301 produces the pixel blocks 302 each including M pixels horizontally and N pixels vertically. The orthogonal transformer 303 performs one-dimensional orthogonal transforms in the horizontal and vertical directions independently. That is, the orthogonal transformer 303 performs a linear transform according to a predetermined equation.
In the case of an 8th-order two-dimensional orthogonal transform, the transform coefficients assume an 8.times.8 matrix. The top-left element of the matrix takes a value corresponding to an average luminance of the pixel block 302, and is called a d.c. component. The other elements in the matrix are called a.c. components.
The information reduction process is effected in the linear quantizer 305. That is, the linear quantizer 305 linearly quantizes the transform coefficients 304 to produce the quantized coefficients 306. The linear quantization is an operation of dividing the transform coefficients 304 by the thresholds registered as the quantization matrix 311 and rounding the divided results. The thresholds registered as the quantization matrix 311 determine characteristics of the quantization, and are set for the respective matrix elements of the coefficients 304. Since an image signal has high correlation, its signal power concentrates on lower-frequency components. Therefore, more accurate quantization can be performed by setting, as shown in an example of FIG. 3, smaller thresholds for the quantization of coefficients corresponding to the lower-frequency components. It is a general procedure that larger thresholds are set for the quantization of coefficients corresponding to the higher-frequency components, to thereby effect rough quantization.
The process of constructing coding symbols is effected in the symbol constructor 307. That is, the symbol constructor 307 produces, from the quantized coefficients 306, the coding symbols (and additional information) 308 that will be used as units of the code assigning process by the encoder 309. The relationship between the quantized coefficients 306 and the coding symbols is registered in the coding symbol table 312.
The code assigning process is effected in the encoder 309. That is, the encoder 309 produces the coded information 310 by entropy-coding the coding symbol and multiplexing the additional information thereinto.
Thus, the image information is coded according to the transform coding technique.
FIG. 14 shows a structure of a code produced by the conventional coding device. The coded information 310 is a repetition of one-block codes consisting of a pair signal consisting of a d.c.-component entropy code and d.c.-component additional information and a plurality of pair signals of an a.c.-component entropy code and a.c.-component additional information.
Referring to a block diagram of FIG. 15, a description is made of a decoding technique.
In FIG. 15, reference numeral 400 represents a decoder for entropy-decoding input coded information 310 to produce a decoding symbol and additional information 401; 402, a coefficient block constructor for constructing quantized coefficients 403 from the decoding symbol and the additional information 401; 404, a linear inverse quantizer for performing inverse quantization on the quantized coefficients 403 to produce inverse-quantized coefficients 405; 406, an inverse orthogonal transformer for performing an inverse orthogonal transform on the inverse-quantized coefficients 405 to produce a decoded image block 407; 408, an image constructor for reconstructing a decoded image signal 409 from the decoded image blocks 407; 410, a decoding symbol table in which decoding symbols are registered; and 411, a quantization matrix for setting quantization characteristic.
The decoding process is symmetrical with the coding process, and includes a decoding process (by the decoder 400), a coefficient construction process, an inverse quantization process and an inverse transform process.
In the decoding process, which is effected in the decoder 400, the decoded symbol and the additional information are reproduced from the coded information 310. The decoded symbol coincides with the coding symbol 308 in the coding process.
In the coefficient construction process, the quantized coefficients 403 are reconstructed that assumes an 8.times.8 matrix. The quantized coefficients 403 have the same values as the quantized coefficients 306 in the coding process.
In the inverse quantization process, which is effected in the linear inverse quantizer 404, the quantized coefficients 403 are multiplied by the respective quantization thresholds that were used in the coding process. As a result, the inverse-quantized coefficients 405 are obtained.
In the inverse transform process, which is effected in the inverse orthogonal transformer 406, the decoded image block 407 is produced from the inverse-quantized coefficients 405.
Finally, the image constructor 408 produces the decoded image signal 409 by arranging the decoded image blocks 407 in a proper order.
In the following, a discussion is made of a process of processing, by the above coding device and decoding device, image data obtained by reading a document.
It is a rare case that the entire document is filled with characters, photographs, etc. Rather, in many cases, a document A includes not only image areas such as a character area B and a photograph area C but a space D (see FIG. 16). Further, a color document sometimes includes an area E having a background of a fixed color.
The following problems will occur in processing the above type of documents by the conventional coding device and decoding device.
(1) In the space D or area E having a background of a fixed color, the same operation is redundantly repeated.
(2) Although the space D has almost no information, coded information is produced. For example, even where a pixel block is "flat" and all the energy of coefficients after the orthogonal transform is concentrated on the d.c. component, it is still necessary to code a group number of the d.c. component and an EOB (end of block) code indicating the end of the coded information of each block, which will lower the coding efficiency.
(3) In the case of decoding coded information of the space D that has been coded according to the conventional technique, it may be the case that 1-block coefficients are produced from coded information of several bits. In this case, the inverse quantization and the inverse orthogonal transform are performed on all the coefficients though a large part of a.c. coefficients are zero. This is not suitable for high-speed processing.
(4) In a document including both of the character area B and the photograph area C (see FIG. 16), the pixel value varies gently in the photograph area C but varies quickly in the character area B; that is, there occurs a local variation of a statistical characteristic. Also in this respect, since the conventional technique cannot adapt to the local variation of a statistical characteristic in an image signal, it is difficult to increase the coding efficiency without reducing the image quality.